package com.bbkb.quartz.remoting;

import com.bbkb.common.exception.BaseException;
import com.bbkb.common.page.PageResult;
import com.bbkb.quartz.dto.SysJobDTO;
import com.bbkb.quartz.exception.QuartzException;
import org.quartz.SchedulerException;

/**
 * @author nobi
 */
public interface ISysJobRemoting {

    /**
     * 新增定时任务
     * @param sysJobDTO
     */
    void addSysJob(SysJobDTO sysJobDTO) throws BaseException;

    /**
     * 获取定时任务
     * @param jobId 定时任务ID
     * @return
     * @throws QuartzException
     */
    SysJobDTO getSysJob(Long jobId) throws BaseException;

    PageResult<SysJobDTO> queryPage(SysJobDTO jobDTO) throws BaseException;

    void run(Long id) throws SchedulerException;
}
